//
//  XS_Button.swift
//  EKLWisdom
//
//  Created by 韩云智 on 2020/2/4.
//  Copyright © 2020 韩云智. All rights reserved.
//

import UIKit
import RxSwift
import RxCocoa

open class XS_Button: UIButton {
    public override var isHighlighted: Bool {
        set {}
        get { return false }
    }
}

public extension Reactive where Base: UIButton {
    var touchDown: ControlEvent<Void> {
        return controlEvent(.touchDown)
    }
    var touchUp: Observable<(Void)> {
        return Observable.of(controlEvent(.touchUpInside), controlEvent(.touchUpOutside)).merge()
    }
}
